package com.lightboat.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 发货类型
 */
@Getter
@AllArgsConstructor
public enum ShippingType {
    SYSTEM_SHIPPING(1, "系统发货"),
    SELF_SHIPPING(2, "自主发货");
    private final Integer type;
    private final String message;

    public static ShippingType getByType(Integer type) {
        for (ShippingType value : ShippingType.values()) {
            if (value.type.equals(type)) {
                return value;
            }
        }
        return null;
    }
}
